﻿function bind() {

    var templateElement = document.getElementById("ToDoTemplate");
    var resultContainer = document.getElementById("sResults");

    alert("Template HTML: " + templateElement.innerHTML);
    alert("JSON Data: " + JSON.stringify(ToDoList));
    alert("Bound HTML:  " + DataBind(templateElement, ToDoList));
    resultContainer.appendChild(DataBind(templateElement, ToDoList));

}